<html>
<head><meta charset="utf-8"><title>Misnamed lint `append_instead_of_extend` · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Misnamed.20lint.20.60append_instead_of_extend.60.html">Misnamed lint `append_instead_of_extend`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="247344018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Misnamed%20lint%20%60append_instead_of_extend%60/near/247344018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Misnamed.20lint.20.60append_instead_of_extend.60.html#247344018">(Jul 27 2021 at 14:54)</a>:</h4>
<p>I noticed, that the lint <a href="https://rust-lang.github.io/rust-clippy/master/index.html#append_instead_of_extend"><code>append_instead_of_extend</code></a> was misnamed. It should be <code>extend_instead_of_append</code> to work when used with <code>allow</code>.  We can just rename it without marking it as renamed, since it didn't hit stable yet, but we would then have to backport that rename to beta.</p>
<p>Thoughts? Maybe also a different/better name while we're at it?</p>



<a name="247352538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Misnamed%20lint%20%60append_instead_of_extend%60/near/247352538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cameron Steffen <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Misnamed.20lint.20.60append_instead_of_extend.60.html#247352538">(Jul 27 2021 at 15:53)</a>:</h4>
<p>Rename now sounds good. For a name, <code>drain_extend</code>? It looks like this can apply to other collections too, and most drain methods do not take a range.</p>



<a name="247352756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Misnamed%20lint%20%60append_instead_of_extend%60/near/247352756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cameron Steffen <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Misnamed.20lint.20.60append_instead_of_extend.60.html#247352756">(Jul 27 2021 at 15:55)</a>:</h4>
<p><code>extend_with_drain</code></p>



<a name="247353410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Misnamed%20lint%20%60append_instead_of_extend%60/near/247353410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Cameron Steffen <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Misnamed.20lint.20.60append_instead_of_extend.60.html#247353410">(Jul 27 2021 at 15:59)</a>:</h4>
<p>Also <code>self_named_constructor</code> -&gt; <code>self_named_constructors</code></p>



<a name="247356329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Misnamed%20lint%20%60append_instead_of_extend%60/near/247356329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> xFrednet <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Misnamed.20lint.20.60append_instead_of_extend.60.html#247356329">(Jul 27 2021 at 16:23)</a>:</h4>
<p>I'm also in favor of renaming the lint now in beta and back porting it, <span class="user-mention silent" data-user-id="360405">Cameron Steffen</span>'s suggestion of <code>extend_with_drain</code> is very nice IMO</p>



<a name="247366481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/Misnamed%20lint%20%60append_instead_of_extend%60/near/247366481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> flip1995 <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/Misnamed.20lint.20.60append_instead_of_extend.60.html#247366481">(Jul 27 2021 at 17:45)</a>:</h4>
<p>Ok I'll rename both during the sync on Thursday <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span>🏻 thanks for the suggestions</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>